package com.pengtu.entity.report;


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.apache.commons.lang.builder.ToStringBuilder;

import com.pengtu.entity.IdEntity;
import com.pengtu.utils.MathsUtils;

/**
 * Materialcheck.
 */
@Entity
@Table(name="T_Q_REPORT_MATERIALCHECK",schema="DGJD")
public class Materialcheck  extends IdEntity {
     /**
	 * serialVersionUID:TODO
	 *
	 * @since 1.0.0
	 */
	 private static final long serialVersionUID = 1L;
     private String pid;
     private String sid;
     private String kind;
     private String name;
     private String brand;
     private String origin;
     private Date constructiondate;
     private Double constructionnumber;
     private String item;
     private Double count;
     private Double pass;
     private String checkorg;
     private Date checkdate;
     private String reportnum;
     private String checkresult;
     private String attachment;
     private String batch;
     private String remark;

    public Materialcheck() {
    }

    @Column(name="PID", length=48)
    public String getPid() {
        return this.pid;
    }
    
    public void setPid(String pid) {
        this.pid = pid;
    }
    
    @Column(name="SID", nullable=false, length=48)
    public String getSid() {
        return this.sid;
    }
    
    public void setSid(String sid) {
        this.sid = sid;
    }
    
    @Column(name="KIND", length=180)
    public String getKind() {
        return this.kind;
    }
    
    public void setKind(String kind) {
        this.kind = kind;
    }
    
    @Column(name="NAME", length=180)
    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    @Column(name="BRAND", length=180)
    public String getBrand() {
        return this.brand;
    }
    
    public void setBrand(String brand) {
        this.brand = brand;
    }
    
    @Column(name="ORIGIN", length=180)
    public String getOrigin() {
        return this.origin;
    }
    
    public void setOrigin(String origin) {
        this.origin = origin;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="CONSTRUCTIONDATE", length=7)
    public Date getConstructiondate() {
        return this.constructiondate;
    }
    
    public void setConstructiondate(Date constructiondate) {
        this.constructiondate = constructiondate;
    }
    
    @Column(name="CONSTRUCTIONNUMBER", precision=18)
    public Double getConstructionnumber() {
        return this.constructionnumber;
    }
    
    public void setConstructionnumber(Double constructionnumber) {
        this.constructionnumber = constructionnumber;
    }
    
    @Column(name="ITEM", length=480)
    public String getItem() {
        return this.item;
    }
    
    public void setItem(String item) {
        this.item = item;
    }
    
    @Column(name="COUNT", precision=18)
    public Double getCount() {
        return this.count;
    }
    
    public void setCount(Double count) {
        this.count = count;
    }
    
    @Column(name="PASS", precision=18)
    public Double getPass() {
        return this.pass;
    }
    
    public void setPass(Double pass) {
        this.pass = pass;
    }
    
    @Column(name="CHECKORG", length=100)
    public String getCheckorg() {
        return this.checkorg;
    }
    
    public void setCheckorg(String checkorg) {
        this.checkorg = checkorg;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="CHECKDATE", length=7)
    public Date getCheckdate() {
        return this.checkdate;
    }
    
    public void setCheckdate(Date checkdate) {
        this.checkdate = checkdate;
    }
    
    @Column(name="REPORTNUM", length=180)
    public String getReportnum() {
        return this.reportnum;
    }
    
    public void setReportnum(String reportnum) {
        this.reportnum = reportnum;
    }
    
    @Column(name="CHECKRESULT", length=480)
    public String getCheckresult() {
        return this.checkresult;
    }
    
    public void setCheckresult(String checkresult) {
        this.checkresult = checkresult;
    }
    
    @Column(name="ATTACHMENT", length=480)
    public String getAttachment() {
        return this.attachment;
    }
    
    public void setAttachment(String attachment) {
        this.attachment = attachment;
    }
    
    @Column(name="BATCH", length=200)
    public String getBatch() {
        return this.batch;
    }
    
    public void setBatch(String batch) {
        this.batch = batch;
    }
    
    @Column(name="REMARK", length=400)
    public String getRemark() {
        return this.remark;
    }
    
    public void setRemark(String remark) {
        this.remark = remark;
    }
    
    /**
     * 
     * getYield:
     * 适用:施工标准合格率,
     * @return 
     * @exception 
     * @since  1.0.0
     */
    @Transient
    public Double getConYield(){
    	return MathsUtils.div("3",this.getPass(),this.getCount());
    } 
    
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}


